home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-01-22 | 23.5 KB | 786 lines | [TEXT/PJMM] |
- unit ConfigureLOM;
-
- interface
-
- uses
- Globals, HelloTabby;
-
- procedure ConfigureDialog;
-
- implementation
-
- var
- theDialog: DialogPtr;
-
- const
- configureDlog = 1002;
- nextLaunchStr = 500; { Resource type: STR }
- defaultsStr = 501;
- BackupPathStr = 504;
- veteranStr = 505;
- flagStr = 506;
- textTypeStr = 507;
- levelToDeleteStr = 508;
- promotionStr = 509;
- tabbyLogArchLimitStr = 510;
- oneCallLimitStr = 511;
- deleteOldUsersStr = 512;
- checkLevelStr = 513;
-
- { -----------------------------------------------------------------}
-
- procedure FrameDItem (dLog: DialogPtr; iNum: integer);
-
- var
- iBox: Rect;
- iType: integer;
- iHandle: Handle;
- oldPenState: PenState;
-
- begin
- GetPenState(oldPenState);
- GetDItem(dLog, iNum, iType, iHandle, iBox);
- InsetRect(iBox, -4, -4);
- PenSize(3, 3);
- FrameRoundRect(iBox, 16, 16);
- SetPenState(oldPenState)
- end;
-
- {----------------------------------------------------------------- }
-
- procedure MakePath (FName: STR255; VRefNum: integer; var MyPath: STR255);
-
- var
- MyPB: CInfoPBRec;
-
- begin
- MyPath := '';
- MyPB.ioCompletion := nil;
- MyPB.ioNamePtr := @FName;
- MyPB.ioVRefNum := VRefNum;
- MyPB.ioFDirIndex := 0;
- MyPB.ioDirID := 0;
- Err := PBGetCatInfo(@MyPB, false);
- MyPB.ioFDirIndex := -1; {}
- MyPB.ioDirID := MyPB.ioDRParID;
- while PBGetCatInfo(@MyPB, false) = NoErr do
- begin
- MyPath := concat(MyPB.ioNamePtr^, ':', MyPath);
- MyPB.ioDirID := MyPB.ioDRParID;
- MyPB.ioFDirIndex := -1;
- end; { while PBGetCatInfo(@MyPB, false) = NoErr }
- end;
-
- { -----------------------------------------------------------------}
-
- procedure ConfigureDialog;
-
- const
- Unselected = 0;
- Active = 0;
- Inactive = 255;
- Selected = 1;
- OKButton = 1; { Configure Dialog Items }
- CancelButton = 2;
- NextLaunchField = 3;
- DeleteLevelField = 4;
- CheckLevelField = 5;
- NecomerField = 6;
- ApprovedLevelField = 7;
- ApprovedTimeField = 8;
- InactivityField = 9;
- OneCallLimitField = 10;
- AfterCallsField = 11;
- VeteranFlagField = 12;
- TEXTTypeField = 13;
- TabbyLimitSizeField = 14;
- BackUpSwitch = 15;
- DeleteByLevelSwitch = 16;
- SortUserlogSwitch = 17;
- ZeroMinSwitch = 18;
- ResetCLSwitch = 19;
- ResetTLSwitch = 20;
- VersionField = 21;
- ChangeLevelSwitch = 23;
- TabbyLimitSwitch = 27;
- MonthlyCLArcSwitch = 28;
- DeleteOldUsersSwitch = 29;
- SkipDeletesSwitch = 31;
- LogDeletesSwitch = 32;
- KillOneTimersSwitch = 33;
- MonthlyTLArcSwitch = 36;
- VeteranCallerSwitch = 37;
- FlagSetRadio = 39;
- FlagClearRadio = 40;
- TabbyKLimitRadio = 43;
- TabbyDayLimitRadio = 44;
- BackupPathField = 49;
- FindButton = 50;
- StuffItSwitch = 52;
-
- var
- DefaultString: str255;
- thisButton: ControlHandle;
- ResHandle2: Handle;
- StringCount: integer;
- where: point;
- fileReply: SFReply;
- ItemHit, itemType, whichItem: integer;
- itemHandle: Handle;
- dispRect: Rect;
-
- procedure AdjustSwitch (whichSwitch: integer; Setting: boolean);
-
- begin
- getDItem(theDialog, whichSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if Setting then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected)
- end;
-
- procedure AdjustActive (whichSwitch: integer; Setting: boolean);
-
- begin
- getDItem(theDialog, whichSwitch, itemType, itemHandle, dispRect);
- if Setting then
- begin
- HiliteControl(ControlHandle(itemHandle), Active);
- SetCtlValue(ControlHandle(itemHandle), Selected)
- end
- else
- begin
- HiliteControl(ControlHandle(itemHandle), Inactive);
- SetCtlValue(ControlHandle(itemHandle), Unselected)
- end
- end;
-
- begin
- InitCursor;
- theDialog := GetNewDialog(configureDlog, nil, POINTER(-1)); {IM I-413}
- SetPort(theDialog);
- FrameDItem(theDialog, Ok);
- DrawDialog(theDialog);
-
- NextLaunch := GetString(nextLaunchStr)^^; { Get next launch string from resource }
- getDItem(theDialog, NextLaunchField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, NextLaunch);
-
- getDItem(theDialog, TEXTTypeField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, TEXTType);
-
- getDItem(theDialog, AfterCallsField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, VetCallsText);
-
- getDItem(theDialog, VeteranFlagField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, FlagNumText);
-
- getDItem(theDialog, BackupPathField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, BackupPath);
-
- getDItem(theDialog, BackupSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if Backup then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected);
-
- getDItem(theDialog, StuffItSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if UseStuffit then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected);
-
- getDItem(theDialog, DeleteByLevelSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if (not Backup) then
- HiliteControl(thisButton, Inactive)
- else
- HiliteControl(thisButton, Active);
- if DeleteByLevel then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected);
-
- getDItem(theDialog, DeleteLevelField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, DeleteLevelString);
-
- getDItem(theDialog, SkipDeletesSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if (not Backup) then
- HiliteControl(thisButton, Inactive)
- else
- HiliteControl(thisButton, Active);
- if SkipDeletes then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected);
-
- getDItem(theDialog, SortUserlogSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if SortUL then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected);
-
- getDItem(theDialog, ZeroMinSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if ZeroMin then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected);
-
- getDItem(theDialog, ResetCLSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if ResetCL then
- begin
- SetCtlValue(thisButton, Selected);
- getDItem(theDialog, MonthlyCLArcSwitch, itemType, itemHandle, dispRect);
- HiliteControl(ControlHandle(itemHandle), Active);
- SetCtlValue(ControlHandle(itemHandle), Selected);
- MonthlyCLArc := true
- end
- else
- begin
- SetCtlValue(thisButton, Unselected);
- getDItem(theDialog, MonthlyCLArcSwitch, itemType, itemHandle, dispRect);
- HiliteControl(ControlHandle(itemHandle), Inactive);
- SetCtlValue(ControlHandle(itemHandle), Unselected);
- MonthlyCLArc := false
- end;
-
- getDItem(theDialog, ResetTLSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if ResetTL then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected);
-
- getDItem(theDialog, MonthlyTLArcSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if MonthlyTLArc then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected);
-
- getDItem(theDialog, ChangeLevelSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if (not Backup) then
- HiliteControl(thisButton, Inactive)
- else
- HiliteControl(thisButton, Active);
- if ChangeLevel then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected);
-
- getDItem(theDialog, NecomerField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, StringOf(Newcomer : 1));
-
- getDItem(theDialog, ApprovedLevelField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, StringOf(Approved : 1));
-
- getDItem(theDialog, ApprovedTimeField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, StringOf(NewTime : 1));
-
- getDItem(theDialog, TabbyLimitSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if (not ResetTL) then
- HiliteControl(thisButton, Inactive)
- else
- HiliteControl(thisButton, Active);
- if (TabbyLimit & ResetTL) then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected);
-
- getDItem(theDialog, TabbyLimitSizeField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, StringOf(TabbyLimitSize : 1));
-
- getDItem(theDialog, DeleteOldUsersSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if (not Backup) then
- HiliteControl(thisButton, Inactive)
- else
- HiliteControl(thisButton, Active);
- if Backup & (DeleteOldUsers | KillOldOneCalls) then
- begin
- SetCtlValue(thisButton, Selected);
- getDItem(theDialog, InactivityField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, StringOf(Inactivity : 1))
- end
- else
- begin
- SetCtlValue(thisButton, Unselected);
- getDItem(theDialog, InactivityField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, '');
- DeleteOldUsers := false
- end;
-
- getDItem(theDialog, CheckLevelField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, CheckLevStr);
-
- getDItem(theDialog, LogDeletesSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if (not Backup) then
- HiliteControl(thisButton, Inactive)
- else
- HiliteControl(thisButton, Active);
- if (Backup & LogDeletes) then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected);
-
- getDItem(theDialog, VeteranCallerSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if (not Backup) then
- HiliteControl(thisButton, Inactive)
- else
- HiliteControl(thisButton, Active);
- if (Backup & AlterVeterans) then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected);
-
- AdjustSwitch(FlagSetRadio, SetTheFlag);
- AdjustSwitch(FlagClearRadio, not SetTheFlag);
-
- AdjustSwitch(TabbyKLimitRadio, TLKLimit);
- AdjustSwitch(TabbyDayLimitRadio, not TLKLimit);
-
- getDItem(theDialog, KillOneTimersSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if (not Backup) then
- HiliteControl(thisButton, Inactive)
- else
- HiliteControl(thisButton, Active);
- if (Backup & KillOldOneCalls) then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected);
-
- getDItem(theDialog, OneCallLimitField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, OneCallLimitString);
-
- TextFont(Geneva);
- TextSize(9);
- ForeColor(redColor);
- getDItem(theDialog, VersionField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, concat('Version ', VERSION, ' of ', Compdate));
- ForeColor(blackColor);
- TextFont(0);
- TextSize(12);
-
- if StillDown then
- repeat
- until not Button;
- repeat
- ModalDialog(nil, ItemHit); {IM I-415}
-
- case ItemHit of
- 1: { OK button hit -- save resources }
- begin
- getDItem(theDialog, NextLaunchField, itemType, itemHandle, dispRect);
- GetIText(itemHandle, NextLaunch);
- ResHandle2 := GetResource('STR ', nextLaunchStr);
- RmveResource(ResHandle2);
- UpdateResFile(CurrentResFile);
- AddResource(Handle(NewString(NextLaunch)), 'STR ', nextLaunchStr, 'Next Launch');
-
- getDItem(theDialog, DeleteLevelField, itemType, itemHandle, dispRect);
- GetIText(itemHandle, DeleteLevelString);
- ResHandle2 := GetResource('STR ', levelToDeleteStr);
- RmveResource(ResHandle2);
- UpdateResFile(CurrentResFile);
- AddResource(Handle(NewString(DeleteLevelString)), 'STR ', levelToDeleteStr, 'Level To Delete');
-
- DefaultString := 'YYYYYYYYYYYYSKS'; { 15 characters for 15 default switches }
-
- if not DeleteByLevel then
- DefaultString[1] := 'N';
-
- if not SkipDeletes then
- DefaultString[2] := 'N';
-
- if not Backup then
- DefaultString[3] := 'N';
-
- if not ZeroMin then
- DefaultString[4] := 'N';
-
- if not SortUl then
- DefaultString[5] := 'N';
-
- if not ResetCL then
- DefaultString[6] := 'N';
-
- if not ResetTL then
- DefaultString[7] := 'N';
-
- if not MonthlyCLArc then
- DefaultString[8] := 'N';
-
- if not LogDeletes then
- DefaultString[9] := 'N';
-
- if not KillOldOneCalls then
- DefaultString[10] := 'N';
-
- if not AlterVeterans then
- DefaultString[11] := 'N';
-
- if not MonthlyTLArc then
- DefaultString[12] := 'N';
-
- if not SetTheFlag then
- DefaultString[13] := 'C';
-
- if not TLKLimit then
- DefaultString[14] := 'D';
-
- if not UseStuffit then
- DefaultString[15] := 'N';
-
- RmveResource(GetResource('STR ', defaultsStr));
- UpdateResFile(CurrentResFile);
- AddResource(Handle(NewString(DefaultString)), 'STR ', defaultsStr, 'Defaults');
-
- if ChangeLevel then
- begin
- PromotionString := 'Y';
- getDItem(theDialog, NecomerField, itemType, itemHandle, dispRect);
- GetIText(itemHandle, TempString);
- for StringCount := 1 to length(TempString) do
- if TempString[StringCount] in ['0'..'9'] then
- PromotionString := concat(PromotionString, TempString[StringCount]);
- if PromotionString[length(PromotionString)] = 'Y' then
- PromotionString := concat(PromotionString, '0');
- PromotionString := concat(PromotionString, ',');
-
- getDItem(theDialog, ApprovedLevelField, itemType, itemHandle, dispRect);
- GetIText(itemHandle, TempString);
- for StringCount := 1 to length(TempString) do
- if TempString[StringCount] in ['0'..'9'] then
- PromotionString := concat(PromotionString, TempString[StringCount]);
- if PromotionString[length(PromotionString)] = ',' then
- PromotionString := concat(PromotionString, '0');
- PromotionString := concat(PromotionString, ',');
-
- getDItem(theDialog, ApprovedTimeField, itemType, itemHandle, dispRect);
- GetIText(itemHandle, TempString);
- for StringCount := 1 to length(TempString) do
- if TempString[StringCount] in ['0'..'9'] then
- PromotionString := concat(PromotionString, TempString[StringCount]);
- if PromotionString[length(PromotionString)] = ',' then
- PromotionString := concat(PromotionString, '0')
- end
- else
- PromotionString := 'N0,0,0';
- RmveResource(GetResource('STR ', promotionStr));
- UpdateResFile(CurrentResFile);
- AddResource(Handle(NewString(PromotionString)), 'STR ', promotionStr, 'Promotion');
-
- if TabbyLimit then
- begin
- if TLKLimit then
- TempString := 'YK'
- else
- TempString := 'YD';
- getDItem(theDialog, TabbyLimitSizeField, itemType, itemHandle, dispRect);
- GetIText(itemHandle, TempString);
- if TLKLimit then
- TempString := concat('YK', TempString)
- else
- TempString := concat('YD', TempString)
- end
- else
- TempString := 'N0';
- RmveResource(GetResource('STR ', tabbyLogArchLimitStr));
- UpdateResFile(CurrentResFile);
- AddResource(Handle(NewString(TempString)), 'STR ', tabbyLogArchLimitStr, 'Tabby Log.Arch Limit');
-
- if DeleteOldUsers then
- begin
- getDItem(theDialog, InactivityField, itemType, itemHandle, dispRect);
- GetIText(itemHandle, TempString);
- TempString := concat('Y', TempString)
- end
- else
- TempString := 'N0';
- RmveResource(GetResource('STR ', deleteOldUsersStr));
- UpdateResFile(CurrentResFile);
- AddResource(Handle(NewString(TempString)), 'STR ', deleteOldUsersStr, 'Delete Old Users?');
-
- getDItem(theDialog, CheckLevelField, itemType, itemHandle, dispRect);
- GetIText(itemHandle, TempString);
- RmveResource(GetResource('STR ', checkLevelStr));
- UpdateResFile(CurrentResFile);
- AddResource(Handle(NewString(TempString)), 'STR ', checkLevelStr, 'Check Level');
-
- if KillOldOneCalls then
- begin
- getDItem(theDialog, OneCallLimitField, itemType, itemHandle, dispRect);
- GetIText(itemHandle, TempString)
- end
- else
- TempString := '0';
- RmveResource(GetResource('STR ', oneCallLimitStr));
- UpdateResFile(CurrentResFile);
- AddResource(Handle(NewString(TempString)), 'STR ', oneCallLimitStr, 'One-Call Limit');
-
- getDItem(theDialog, TEXTTypeField, itemType, itemHandle, dispRect);
- GetIText(itemHandle, TempString);
- RmveResource(GetResource('STR ', textTypeStr));
- UpdateResFile(CurrentResFile);
- AddResource(Handle(NewString(TempString)), 'STR ', textTypeStr, 'TEXT Type');
-
- getDItem(theDialog, AfterCallsField, itemType, itemHandle, dispRect);
- GetIText(itemHandle, TempString);
- RmveResource(GetResource('STR ', veteranStr));
- UpdateResFile(CurrentResFile);
- AddResource(Handle(NewString(TempString)), 'STR ', veteranStr, 'Veteran calls');
-
- getDItem(theDialog, VeteranFlagField, itemType, itemHandle, dispRect);
- GetIText(itemHandle, TempString);
- RmveResource(GetResource('STR ', flagStr));
- UpdateResFile(CurrentResFile);
- AddResource(Handle(NewString(TempString)), 'STR ', flagStr, 'Veteran flag');
-
- getDItem(theDialog, BackupPathField, itemType, itemHandle, dispRect);
- GetIText(itemHandle, TempString);
- RmveResource(GetResource('STR ', backupPathStr));
- UpdateResFile(CurrentResFile);
- AddResource(Handle(NewString(TempString)), 'STR ', backupPathStr, 'Backup Path');
-
- end; {OK Button}
-
- Cancel:
- ; { Cancel button hit—do nothing }
-
- BackupSwitch:
- begin { Backup switch }
- Backup := not (Backup);
- getDItem(theDialog, BackupSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if Backup then
- begin
- SetCtlValue(thisButton, Selected);
- AdjustActive(DeleteByLevelSwitch, true);
- DeleteByLevel := true;
- AdjustActive(SkipDeletesSwitch, true);
- SkipDeletes := true;
- AdjustActive(ChangeLevelSwitch, true);
- ChangeLevel := true;
- AdjustActive(DeleteOldUsersSwitch, true);
- DeleteOldUsers := true;
- AdjustActive(LogDeletesSwitch, true);
- LogDeletes := true;
- AdjustActive(KillOneTimersSwitch, true);
- KillOldOneCalls := true;
- AdjustActive(VeteranCallerSwitch, true);
- AlterVeterans := true
- end
- else
- begin
- SetCtlValue(thisButton, Unselected);
- AdjustActive(DeleteByLevelSwitch, false);
- DeleteByLevel := false;
- AdjustActive(SkipDeletesSwitch, false);
- SkipDeletes := false;
- AdjustActive(ChangeLevelSwitch, false);
- ChangeLevel := false;
- AdjustActive(DeleteOldUsersSwitch, false);
- DeleteOldUsers := false;
- AdjustActive(LogDeletesSwitch, false);
- LogDeletes := false;
- AdjustActive(KillOneTimersSwitch, false);
- KillOldOneCalls := false;
- AdjustActive(VeteranCallerSwitch, false);
- AlterVeterans := true
- end
- end;
-
- DeleteByLevelSwitch:
- begin { DeleteByLevel switch }
- DeleteByLevel := not DeleteByLevel;
- AdjustSwitch(DeleteByLevelSwitch, DeleteByLevel)
- end;
-
- SkipDeletesSwitch:
- begin { SkipDeletes switch }
- SkipDeletes := not SkipDeletes;
- AdjustSwitch(SkipDeletesSwitch, SkipDeletes)
- end;
-
- SortUserlogSwitch:
- begin { SortUl switch }
- SortUl := not SortUl;
- AdjustSwitch(SortUserlogSwitch, SortUl)
- end;
-
- ZeroMinSwitch:
- begin { ZeroMin switch }
- ZeroMin := not (ZeroMin);
- getDItem(theDialog, ZeroMinSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if ZeroMin then
- SetCtlValue(thisButton, Selected)
- else
- SetCtlValue(thisButton, Unselected)
- end;
-
- ResetCLSwitch:
- begin { ResetCL switch }
- ResetCL := not (ResetCL);
- getDItem(theDialog, ResetCLSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if ResetCL then
- begin
- SetCtlValue(thisButton, Selected);
- AdjustActive(MonthlyCLArcSwitch, true);
- MonthlyCLArc := true
- end
- else
- begin
- SetCtlValue(thisButton, Unselected);
- AdjustActive(MonthlyCLArcSwitch, false);
- MonthlyCLArc := false
- end;
- end;
-
- ResetTLSwitch:
- begin { ResetTL switch }
- ResetTL := not (ResetTL);
- getDItem(theDialog, ResetTLSwitch, itemType, itemHandle, dispRect);
- thisButton := ControlHandle(itemHandle);
- if ResetTL then
- begin
- SetCtlValue(thisButton, Selected);
- AdjustActive(TabbyLimitSwitch, true);
- AdjustActive(MonthlyTLArcSwitch, true);
- AdjustActive(TabbyKLimitRadio, true);
- AdjustActive(TabbyDayLimitRadio, true);
- if TLKLimit then
- getDItem(theDialog, TabbyDayLimitRadio, itemType, itemHandle, dispRect)
- else
- getDItem(theDialog, TabbyKLimitRadio, itemType, itemHandle, dispRect);
- SetCtlValue(ControlHandle(itemHandle), Unselected);
- TabbyLimit := true
- end
- else
- begin
- SetCtlValue(thisButton, Unselected);
- AdjustActive(TabbyLimitSwitch, false);
- AdjustActive(MonthlyTLArcSwitch, false);
- AdjustActive(TabbyKLimitRadio, false);
- AdjustActive(TabbyDayLimitRadio, false);
- TabbyLimit := false
- end
- end;
-
- MonthlyTLArcSwitch:
- begin
- MonthlyTLArc := not MonthlyTLArc;
- AdjustSwitch(MonthlyTLArcSwitch, MonthlyTLArc)
- end;
-
- StuffItSwitch:
- begin
- UseStuffit := not UseStuffit;
- AdjustSwitch(StuffItSwitch, UseStuffit)
- end;
-
- ChangeLevelSwitch:
- begin { ChangeLevel users switch }
- ChangeLevel := not (ChangeLevel);
- AdjustSwitch(ChangeLevelSwitch, ChangeLevel)
- end;
-
- TabbyLimitSwitch:
- begin { TabbyLimit switch }
- TabbyLimit := not (TabbyLimit);
- AdjustSwitch(TabbyLimitSwitch, TabbyLimit)
- end;
-
- MonthlyCLArcSwitch:
- begin { Monthly CL Archive switch }
- MonthlyCLArc := not (MonthlyCLArc);
- AdjustSwitch(MonthlyCLArcSwitch, MonthlyCLArc)
- end;
-
- DeleteOldUsersSwitch:
- begin { Delete Old Users switch }
- DeleteOldUsers := not DeleteOldUsers;
- AdjustSwitch(DeleteOldUsersSwitch, DeleteOldUsers)
- end;
-
- LogDeletesSwitch:
- begin { Log Deletes switch }
- LogDeletes := not (LogDeletes);
- AdjustSwitch(LogDeletesSwitch, LogDeletes)
- end;
-
- VeteranCallerSwitch:
- begin
- AlterVeterans := not (AlterVeterans);
- AdjustSwitch(VeteranCallerSwitch, AlterVeterans)
- end;
-
- FlagSetRadio:
- begin
- SetTheFlag := true;
- AdjustSwitch(FlagSetRadio, true);
- AdjustSwitch(FlagClearRadio, false)
- end;
-
- FlagClearRadio:
- begin
- SetTheFlag := false;
- AdjustSwitch(FlagSetRadio, false);
- AdjustSwitch(FlagClearRadio, true)
- end;
-
- TabbyKLimitRadio:
- begin
- TLKLimit := true;
- AdjustSwitch(TabbyKLimitRadio, true);
- AdjustSwitch(TabbyDayLimitRadio, false)
- end;
-
- TabbyDayLimitRadio:
- begin
- TLKLimit := false;
- AdjustSwitch(TabbyKLimitRadio, false);
- AdjustSwitch(TabbyDayLimitRadio, true)
- end;
-
- KillOneTimersSwitch:
- begin { Kill Old One-Time Callers switch }
- KillOldOneCalls := not KillOldOneCalls;
- AdjustSwitch(KillOneTimersSwitch, KillOldOneCalls)
- end;
-
- FindButton:
- begin
- where.h := 60;
- where.v := 80;
- SFPPutFile(where, 'Select backup location', 'Click to select', nil, fileReply, 3999, nil);
- if fileReply.good then
- begin
- MakePath(fileReply.fname, fileReply.vRefNum, BackupPath);
- getDItem(theDialog, BackupPathField, itemType, itemHandle, dispRect);
- SetIText(itemHandle, BackupPath);
- end;
- FrameDItem(theDialog, Ok);
- end;
-
- otherwise
- ; { do nothing }
-
- end;
- until (ItemHit = OK) | (ItemHit = Cancel);
- DisposDialog(theDialog)
- end;
- end.